﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Examination.aspx.cs" Inherits="Web.Examination" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <script>
        //function f() {alert(event.srcElement.value);}
        /*if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)){alert('你是使用IE')}else
        if (navigator.userAgent.indexOf('Firefox') >= 0){alert('你是使用Firefox')}else
        if (navigator.userAgent.indexOf('Opera') >= 0){alert('你是使用Opera')}else
        {alert('你是使用其他的浏览器浏览网页！')}*/
        function isIE() { //ie? 
            if (window.navigator.userAgent.toLowerCase().indexOf("msie") >= 1)
                return true;
            else
                return false;
        }

        if (!isIE()) { //firefox innerText define
            HTMLElement.prototype.__defineGetter__("innerText",
                function () {
                    var anyString = "";
                    var childS = this.childNodes;
                    for (var i = 0; i < childS.length; i++) {
                        if (childS[i].nodeType == 1)
                        //anyString += childS[i].tagName=="BR" ? "\n" : childS[i].innerText;
                            anyString += childS[i].innerText;
                        else if (childS[i].nodeType == 3)
                            anyString += childS[i].nodeValue;
                    }
                    return anyString;
                }
            );
            HTMLElement.prototype.__defineSetter__("innerText",
                function (sText) {
                    this.textContent = sText;
                }
            );
        }
    </script>
    <style>
        #divWrap{width:888px;margin:0 auto;text-align:center;color:#666;background:#eee;}
        #currentQ{margin:7px auto;width:800px;overflow: hidden;border:dashed 1px #ccc;padding-left:14px;padding-right:14px;padding-top:6px;padding-bottom:14px;letter-spacing:1px;text-align:left;line-height:24px;}
        #imgPrevious,#imgNext,input[type=checkbox],label{cursor:pointer;}
        .divOp{float:left;width:350px;}
        input[type=submit]{cursor:pointer;}
    </style>
</head>
<body><form id="Form1" runat=server><input type=hidden id=hdId runat=server/>
<div id="divWrap">
    <img src="Images/top.jpg" />
    <div id="currentQ">
        <h2><label runat="server" id="lblTitle"></label></h2>
		<div><label runat="server" id="lblQuestion"></label><br />
		<asp:Repeater ID="rptList" Runat="server">
			<HeaderTemplate>
			</HeaderTemplate>
			<ItemTemplate>
                <DIV class=divOp><INPUT checked='<%#Eval("IsChecked")%>' id="chk" value='<%#Eval("Value")%>' type='checkbox' runat="server"/><LABEL for=chk><%#Eval("Text")%></LABEL></DIV>
			</ItemTemplate>
			<FooterTemplate>
			</FooterTemplate>
		</asp:Repeater>
		</div>
    </div>
    <asp:Button runat="server" ID="btnPrevious" Text="上一题" OnClick="btnPrevious_Click"/>
    <asp:Button runat="server" ID="btnNext" Text="下一题" OnClick="btnNext_Click"/>
</div></form>
</body>
</html>